ke.create({
	data:{
		loadList:true,
		list:[],
		total:0,
		size:20,

		search:{
			key:''
		}
	},
	methods:{
		tabSize:function(s){
			this.size = s
			this.loadLists(1)
		},
		loadLists:function(p){
			this.loadList = true
			http.get({
				params:{
					size:this.size,
					page:p,
					key:this.search.key
				},
				success:function(res){
					vm.loadList = false
					if(res.code ===0 ){
						vm.$message.error(res.msg)
					}else{
						vm.list = res.data.list
						vm.total = res.data.total
						vm.scrollTop()
					}
				}
			})
		},
		onDelete:function(id){
			this.$confirm('此操作将彻底删除该记录，是否继续？',{
				callback:function(type){
					if(type=='confirm'){
						http.post({
							url:vm.map.delete,
							data:{id:id},
							success:function(res){
								if(res.code===0){
									vm.$message.error(res.msg)
								}else{
									vm.$message.success('删除成功')
									setTimeout(function(){
										vm.reload()
									},800)
								}
							}
						})
					}
				}
			})
		},
		onSearch:function(){
			this.loadLists(1)
		},

		onUpdateUserInfo:function(){
			var loading = this.$loading({
	          lock: true,
	          text: '数据处理中',
	          background: 'rgba(0, 0, 0, 0.7)'
	        })
	        http.get({
	        	url:this.map.update,
	        	success:function(res){
	        		loading.close()
	        		if(res.code===0){
	        			vm.$message.error(res.msg)
	        		}else{
	        			vm.$message.success('更新完毕')
	        		}
	        	}


	        })
		}
	},
	created:function(){
		this.loadLists(1)
		this.$notify.info({
        	title: '消息',
        	message: '内容不会实时修改到会员数据，会员的积分变动才能更新数据。或者点击更新用户会员组数据。'
        });
	}
})